<?php
	if(file_exists($displayFile)){
		$smarty = new Smarty();
		$smarty->template_dir	= PATH_APP.'View'.DS;
		$smarty->compile_dir	= PATH_LIB.'Smarty'.DS.'template_c'.DS;
		$smarty->left_delimiter = '{'; 
		$smarty->right_delimiter = '}';
		$smarty->cache_lifetime = 0;  //设置缓存时间
		if (is_array($assign)) {
			foreach ($assign AS $k=>$v) {
				$smarty->assign($k, $v);
			}
		}else{
			$smarty->assign('data', $tpl);
		}
		$smarty->assign('cfg', $cfg);
		$smarty->assign('DOMAIN', DOMAIN);
		$smarty->assign('DIR_ROOT', DIR_ROOT);
		$smarty->assign('SITE_URL', URL_ROOT);
		$smarty->assign('JS', URL_JS);
		$smarty->assign('CSS', URL_CSS);
		$smarty->assign('URL_IMAGES', URL_IMAGES);
		$smarty->assign('CHARSET', CHARSET);

		$smarty->display($displayFile);
		//echo '<!--';pr($tpl);echo ' -->';
	}
?>